import Head from 'next/head';
import TableInstanceAPIsTable from '../../../components/prop-tables/TableInstanceAPIsTable';
import SourceCode from '../../../components/prop-tables/TableInstanceAPIsSource';
import OptionsSwitcher from '../../../example-groups/OptionsSwitcher';

<Head>
  <title>{'Table Instance APIs - Material React Table V3 Docs'}</title>
  <meta
    name="description"
    content="All the table instance methods and objects that can be accessed from the table instance in Material React Table"
  />
  <meta
    property="og:title"
    content="Material React Table Table Instance API Reference"
  />
  <meta
    property="og:description"
    content="A reference of all the table instance api methods and objects that can be used in Material React Table"
  />
</Head>

## Table Instance APIs

<OptionsSwitcher
  links={[
    {
      label: 'Table Instance APIs',
      value: 'table-instance-apis',
    },
    {
      label: 'Column Instance APIs',
      value: 'column-instance-apis',
    },
    {
      label: 'Row Instance APIs',
      value: 'row-instance-apis',
    },
    {
      label: 'Cell Instance APIs',
      value: 'cell-instance-apis',
    },
  ]}
/>

> NOTE: These are NOT the [table options](/docs/api/table-options) for Material React Table. These are just static methods on a table instance that you can use.

These are the methods available on the `table` instance that is returned from the `useMaterialReactTable` hook. You can use these methods to interact with the table instance.

```jsx
const columns = useMemo(() => [
  {
    accessor: 'name',
    header: 'Name',
    Cell: ({ cell, table }) => <span onClick={() => table.{/* or maybe here */}}></span>,
  },
], []);

const table = useMaterialReactTable({
  columns,
  data,
  renderTopToolbarCustomActions: ({ table }) => <Button onClick={() => table{/* or maybe here */}}>Click Me</Button>,
});

const someEventHandler = () => {
  table. //call any of the table instance methods here
};

return <MaterialReactTable table={table} />;
```

<TableInstanceAPIsTable />

<SourceCode />
